package com.tianji.promotion.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.query.CodeQuery;
import com.tianji.promotion.domain.vo.CouponCodeVO;
import com.tianji.promotion.domain.vo.CouponScopeVO;
import com.tianji.promotion.service.IExchangeCodeService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 兑换码 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-20
 */
@Api(tags = "兑换码管理")
@RestController
@RequiredArgsConstructor
@RequestMapping("/codes")
public class ExchangeCodeController {
    private final IExchangeCodeService codeService;
    /**
     * 查看兑换码
     */
    @GetMapping("page")
    public PageDTO<CouponCodeVO> queryCouponScopeList(CodeQuery query) {
        return codeService.queryCouponScopeList(query);
    }

}

